﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RATSharp.Model;
using RATSharp.Rest;
using RATSharp.Collection;
using RATSharp;
using System.Threading.Tasks;
using RATSharp.Validator;

namespace RATSharp.Cal
{
    class ObjectReservationHandler : IReservationHandler
    {

        RestService service;
        InvalidateCalendarDelegate invalidate;
        public ObjectReservationHandler(RestService service, InvalidateCalendarDelegate invalidateCalendar)
        {
            this.service = service;
            this.invalidate = invalidateCalendar;
        }

        public MenuItem<string, CalendarDateTimeHandler> getAllowedCalendarActions()
        {
            return null;
        }


        public void handle(Period period)
        {
            MenuList<MenuItem<string, MenuHandler>, MenuItem<string, MenuHandler>> periodList =
              new MenuList<MenuItem<string, MenuHandler>, MenuItem<string, MenuHandler>>("Reservation Period from " + String.Format("{0:dd.MM yyyy}", period.fromDate));
            Console.WriteLine(periodList);

            Console.WriteLine(String.Format("Reservation by {0}", period.reservation.userName));
            Console.WriteLine(String.Format("Object name {0}", period.reservation.objectName));
            int choice = MenuUtilities.GetSimpleInput(new IntRangeInputValidator(1, periodList.fullCount)) - 1;
        }
    }
}
